package com.carhailing.coupons.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.carhailing.common.domain.coupons.*;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: Gd
 * @package: com.carhailing.coupons.mapper
 * @Project: Online_Taxi_Project
 * @Name: CouponScheduleMapper
 * @Date: 2024-7-25 15:12
 */
@Mapper
public interface CouponScheduleMapper extends BaseMapper<CouponScheduleDto> {



    List<CouponsScheduleAndCouponsRelationVo> selectByCouponActiveIds(@Param("sessionIds") List<Long> sessionIds);

    List<CouponScheduleDto> selectCouponScheduleList(CouponScheduleDto couponScheduleDto);

    List<CouponsVo> selectCouponsInfo(@Param("couponScheduleStartTime") String couponScheduleStartTime, @Param("couponScheduleEndTime") String couponScheduleEndTime);

    void updateCouponsStatus(@Param("couponId") Integer couponId);

    CouponsActiveVo selectCouponsActiveInfo(@Param("couponScheduleId") Long couponScheduleId);

    CouponsVo selectCoupons(@Param("couponId") Integer couponId);

    CouponUseRecord selectCouponsRecord(@Param("userid") Integer userid);

    void insertCouponUseRecord(CouponUseRecord couponUseRecord);

    CouponsVo selectCouponsInfos(@Param("couponScheduleStartTime") String couponScheduleStartTime);

    Integer updateCouponsTotal(@Param("couponId") Integer couponId);
}
